package com.cy1;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author xxx
 * @date 2022/07/25 01:45
 **/
public class CollectionsDemo2 {
    public static void main(String[] args) {
        List<Student> students = new ArrayList<>();
        students.add(new Student("chenyong", 24));
        students.add(new Student("yuanxiang", 25));
        students.add(new Student("a", 15));
        Collections.sort(students);
        System.out.println(students);

    }
}
